﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SPOooON.SDK.Array
{
    public class SparseArray<T>
    {
        private Dictionary<int, T> dictionary = new Dictionary<int ,T>();

        /// <summary>
        /// indexer for sparsearray
        /// </summary>
        /// <param name="Index">an index</param>
        /// <returns>object at index</returns>
        public T this[int Index] 
        {
            get { return dictionary[Index]; }
            set { dictionary[Index] = value; }
        }
    }
}
